#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "qfileinfo.h"
#include <QListWidget>
#include <QMainWindow>
#include <QStandardItemModel>
#include <QStringListModel>
#include <QTimer>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void initializeUI();
    void loadEmojiData();

    void processQQAccount(const QFileInfo& accountDir);
    void addAccountToList(const QString& accountName, const QStringList& emojiPaths);

private:
    void copyImageToClipboard(const QString &filePath);
    void copyAnimatedGifToClipboard(const QString &filePath);
    void showFileProperties(const QString &filePath);

private slots:
    void slotListItemRightClicked(const QModelIndex &index, const QPoint &globalPos);

private slots:
    void on_lineEdit_textChanged(const QString &arg1);

    void on_cb_account_currentIndexChanged(int index);

private:
    Ui::MainWindow *ui;
    QStandardItemModel m_model;

    QTimer mediawiki_search_timer;

    // QWidget interface
protected:
    void resizeEvent(QResizeEvent *event) override;
    void keyPressEvent(QKeyEvent *event) override;
};
#endif // MAINWINDOW_H
